pandas group by multiple columns and count

31

df.groupby(['col1', 'col2']).size() 
   .sort_values(ascending=False) 
   .reset_index(name='count') 

Comments

Submit
0 Comments